<meta charset="utf-8">
<style type="text/css">
	iframe{vertical-align: middle;}
</style>
啦啦啦，我是一枚帅气的爹<br/>
我是最单纯可爱的儿子：<iframe src="iframe-call.html" id="pure"></iframe><br>
我是被亲爹修改的儿子：<iframe src="iframe-call.html" id="change_by_father"></iframe><br>
<button id="iframe-rewrite">我是可以修改亲爹的儿子</button>
<script type="text/javascript">
	window.frames['change_by_father'].contentWindow.document.write('来自父页面的修改')

	/*引入iframe-rewrite修改本页面*/
	document.getElementById('iframe-rewrite').addEventListener('click',function(e){
		var iframe=document.createElement('iframe');
		iframe.src="iframe-rewrite.html"
		document.body.appendChild(iframe)
	});
</script>

<p><a onclick="
	var text='<script>target=window.parent.document.getElementsByTagName(\'a\');
	for(var x =0; x < target.length; x++){
		if(target[x].getAttribute(\'href\')){
			target[x].addEventListener(\'click\',function(e){
				e.preventDefault();
				var xx=window.open(e.target.getAttribute(\'href\'));
				xx.document.write(\'hack by bb\');},true)}
			}</script>';
	var frame=document.createElement('iframe'); document.body.appendChild(frame);
	frame.contentWindow.document.write(text);
	" href="javascript:void">点击添加一个iframe</a></p>